<template>
  <div style="margin-top:20px">
    <el-form ref="form" label-width="80px" :model="form">
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="编码" style="margin-right:15px">
              <el-input v-model="form.code" :disabled="true" />
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="客户" style="margin-right:15px">
              <el-input v-model="form.customerCode" :disabled="true" />
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="计费类型" style="margin-right:15px">
              <el-input v-model="form.chargingType" :disabled="true" />
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="系统类型" style="margin-right:15px">
              <el-input v-model="form.sysType" :disabled="true" />
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="单价" style="margin-right:15px">
              <el-input v-model="form.price" :disabled="true" />
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="计费方式" style="margin-right:15px">
              <el-input v-model="form.chargingMode" :disabled="true" />
            </el-form-item>
          </div>
        </el-col>
      </el-row>
     <!-- <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="生效日期" style="margin-right:15px">
              <el-input v-model="form.startDate" :disabled="true" />
            </el-form-item>
          </div>
        </el-col>
      </el-row>
      <el-row>
        <el-col :span="24">
          <div class="grid-content bg-purple">
            <el-form-item label="生效日期" style="margin-right:15px">
              <el-input v-model="form.endDate" :disabled="true" />
            </el-form-item>
          </div>
        </el-col>
      </el-row>-->
    </el-form>
  </div>
</template>
<script>
import Vue from 'vue'
import 'xe-utils'
import VXETable from 'vxe-table'
import 'vxe-table/lib/index.css'
import request from '@/utils/request'
Vue.use(VXETable)
export default {
  name: 'ChargingTypeDetail',
  data() {
    return {
      emptyForm: {},
      form: {
        code: '',
        customerCode: '',
        chargingType: '',
        sysType: '',
        price: '',
        chargingMode: '',
     /*   startDate: '',
        endDate: ''*/
      }
    }
  },
  created() {
    // 保存空表单对象
    this.emptyForm = JSON.parse(JSON.stringify(this.form))
  },
  methods: {
    // 获取页面信息
    getInfo(code) {
      // 查询到数据之前先展示空表单
      this.form = JSON.parse(JSON.stringify(this.emptyForm))
      request({ url: `/arpa-basic-api/chargingType/${code}`, method: 'get' }).then(response => {
        this.form = response.data
      })
    }
  }
}
</script>
<style lang="scss" scoped>
    .dialog-footer {
        margin-top: 50px;
    }
</style>
